import React from "react";
import { DatePicker } from 'antd';
const dateFormat = 'YYYY-MM-DD';



const XxDatePicker = ({ onChange, value, picker, ...props }) => {

    const onLocalChange = (date, dateString) => {
        console.log(date, dateString);
        onChange(dateString);
    };

    return (
        <>
            <DatePicker
                onChange={onLocalChange}
                picker={picker ? picker : undefined}
                format={dateFormat}
                style={{
                    width: "100%"
                }}
                {...props}


            />
        </>
    )
}

export default XxDatePicker